﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Example32.aspx.cs" Inherits="Chapter05.Example32" %>

<!DOCTYPE html>

<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>代码清单 5-32 使用 finally 子句</title>
</head>
<body>
    <form>
        <div>
            <script type="text/javascript">
                try {
                    var myArray;
                    for (var i = 0; i < myArray.length; i++) {
                        document.writeln("index " + i + ": " + myArray[i]);
                    }

                } catch (e) {
                    document.writeln("Error: " + e);

                } finally {
                    document.writeln("Statements here are always executed");
                }
            </script>
        </div>
    </form>
</body>
</html>
